/*
js自测 dom的remove() 删除节点方法
 */
Element.prototype._remove = function () {
    // 不可remove的
    if (!(this instanceof Element) || this.tagName === 'HTML') {
        throw new TypeError(`${this} is not an element or cannot be removed`);
    }
    const el = this;
    // 子节点找到父节点再用removeChild()方法将自己删除
    el.parentElement.removeChild(el);
}
